package com.datastructure.stackandqueue;


import java.util.concurrent.ArrayBlockingQueue;
import java.util.concurrent.LinkedBlockingQueue;

/**
 * @author: 临晖
 * @date: 2023/10/19
 * @description:
 */
public class MyStack {
    private int[] qu = null;
    private int i = 0;
    public MyStack() {
        qu = new int[10];
    }

    public void push(int x) {
        qu[i++] = x;
    }

    public int pop() {
        return qu[--i];
    }

    public int top() {
        return qu[i - 1];
    }

    public boolean empty() {
        return i == 0;
    }
}



